n = list(map(int,input("").split()))
a = max(n)
b = min(n)
print("%d %d"%(a,b))